package com.pactera.madp.cp.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pactera.madp.cp.api.entity.workroom.WorkContactEmployeeStatisticsEntity;
import com.pactera.madp.cp.api.model.workcontact.WorkContactLossData;
import com.pactera.madp.cp.api.model.workcontact.WorkContactNewAddData;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * WorkContactEmployeeStaticsMapper
 *
 * @author jun
 * @version 1.0
 * 2021/7/19 17:22
 **/
public interface WorkContactEmployeeStaticsMapper extends BaseMapper<WorkContactEmployeeStatisticsEntity> {

    List<WorkContactLossData> getLossContact(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("corpId") Integer corpId);

    List<WorkContactNewAddData> getNewAddContact(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("corpId") Integer corpId);

    Integer sumCrmContactInEmployeeIds(@Param("corpId") Integer corpId, @Param("tenantId") Integer tenantId, @Param("dateTime") DateTime dateTime, @Param("employeeIds") Set<Integer> employeeIds);

    Integer sumNonBankContactInEmployeeIds(@Param("corpId") Integer corpId, @Param("tenantId") Integer tenantId, @Param("dateTime") DateTime dateTime, @Param("employeeIds") Set<Integer> employeeIds);

}
